// 导入axios实例对象
import request from '@/utils/request'

// 封装登录接口
export const login = (data) => {
  // 返回axios调用后得到的promise对象
  return request.post('/h5/user/login', {
    username: data.username,
    password: data.password
  })
}

// 封装获取用户信息接口
export const getUserInfo = () => {
  return request.get('/h5/user/currentUser')
}